package chapter_7;

import java.io.FileReader;

public class Test9 {
    public static void main(String[] args) throws Exception{
        FileReader fr = new FileReader("D:\\copy.txt");
        StringBuffer sb = new StringBuffer();
        char[] chars = new char[1024];
        int lenght;
        while((lenght = fr.read(chars)) != -1){
            sb.append(chars,0,lenght);
        }
        System.out.println(sb);
    }
}
